Get Work Order
Introduction
The following Assetic REST API endpoints may be used to retrieve one or more work orders.
- GET /api/v2/workorder/{id}
- Returns a single work order for the given work order GUID
- GET /api/v2/workorder
- Paginated list of work orders.
- Search filters, pagination and ordering can be applied as per the article Search-Filters-and-Pagination
- Optional filter "assignedId" is used to filter work orders by the resource ID of the resource assigned to the work order
Sample Payloads
Get a single work order by ID
The unique internal GUID of the work order is used to retrieve a single work order. In the example below the GUID is "73c57805-4add-42e5-937f-827ad03ea215"
https://[your_site].assetic.net/api/v2/workorder/73c57805-4add-42e5-937f-827ad03ea215
Get multiple work orders by search criteria
The example below gets all work orders where the last modified date is greater than or equal to the datetime 12-July-2018 15:08:35. It gets the first page of 500 records and sorts by "FriendlyId" in descending order
https://[your_site].assetic.net/api/v2/workorder?requestParams.sorts=FriendlyIdStr-desc&requestParams.filters=LastModified~gte~%272018-07-12T15%3A08%3A35%27&requestParams.page=1&requestParams.pageSize=500
Response
The response from the GET requests is the full detail of the work order including:
- Status
- Asset
- Work Order Work Group
- Work Order Type
- Scheduling - expected and actual dates for the work
- Supporting Information array - each comment is a separate object with it's own timestamp
- Supporting Information from associated Work Requests array
- Work Task array
- Labours (assigned resources)
- Maintenance Materials
- Maintenance Services
- Linked Work Request array - Work Request GUID and Friendly Id
These response objects list above are described in detail in the article Create Work Order, with the exception of the Linked Work Request array. It is not possible to link work request to the work order when creating the work order.
Sample Response
The following response is for a single work order using the GET by ID endpoint
{ "Id": "73c57806-4add-42e5-937f-827ad03e2215", "FriendlyIdStr": "WO538", "BriefDescription": "Pothole in Collins St", "ExternalId": null, "ReferenceNumber": null, "ReferenceWorkOrderId": null, "LossOfServiceRequired": false, "CreatedDateTime": "2023-06-26T13:49:54", "LastModified": "2023-06-26T13:49:54", "CreatorId": "36bee8ab-4e39-4f1d-b713-4eefa221fcd8", "RequestorId": "36bee8ab-4e39-4f1d-b713-4ee2a521fcd8", "ResponsibleOfficerId": null, "ResponsibleOfficer": null, "WorkOrderWorkGroup": "COPC East", "RequestedBy": { "Id": "36bee8ab-4e39-4f1d-b713-42efa521fcd8", "DisplayName": "Kevin Wilson", "_links": [], "_embedded": null }, "CreatedBy": { "Id": "36bee8ab-4e39-4f1d-b713-4e2fa521fcd8", "DisplayName": "Kevin Andrews", "_links": [], "_embedded": null }, "Status": "PREP", "AssetId": "509d80ca-0539-e711-946c-06edd62954d7", "PriorityId": 2, "Priority": "5 Days", "WorkTasks": [ { "Id": "d017f85d-835d-4d15-8643-147dd86a9458", "FriendlyId": 5, "BriefDescription": "Pothole", "Status": 5, "LowestMaintenanceItem": null, "Type": "WTTask", "TypeId": 13, "AsmtTaskForms": null, "_links": [], "_embedded": null } ], "LocationDescription": "298, Collins Street, Melbourne, VIC, 3004, Australia", "PointString": "115.14890017385801 -34.31703228504955", "EstimatedDuration": 2, "Asset": { "Id": "509d80ca-0539-e711-946c-06edd62954d7", "AssetId": "ROAD919313", "AssetName": "Collins Street", "WorkGroupId": 22, "AssetWorkGroup": "COPC East", "CriticalityId": "0befeca4-80ba-e511-9451-06edd62954d7", "AssetCriticality": "Access", "AssetCategoryId": "246da33d-6544-e411-82fb-f4b7e2cd8977", "AssetCategory": "SealedRoads", "AssetMaintenanceType": "Sealed Road", "_links": [], "_embedded": null }, "SupportingInformation": [ { "Id": "634ee354-9559-486f-bc01-9658d4726808", "Description": "Pothole in East bound lane", "CreatedBy": "36bee8ab-4e39-4f1d-b713-4eefa521fcd8", "CreatedByDisplayName": "Kevin Wilson", "CreatedDateTime": "2018-06-26T13:49:54", "_links": [], "_embedded": null } ], "WRSupportingInformation": [], "MaintenanceMaterials": [], "MaintenanceServices": [], "WorkOrderType": { "Id": 6, "Name": "Corrective Maintenance", "Code": "CM - Corrective", "BudgetType": "OPEX", "Description": "Bringing a failed item back to functional condition", "IsFailureRequired": true, "IsCauseRequired": true, "IsRemedyRequired": true, "_links": [], "_embedded": null }, "FailureSubCodeId": 42, "CauseSubCodeId": 22, "RemedyCodeId": 44, "PreventiveMaintenanceId": null, "Scheduling": { "DueDate": "2023-07-01T13:47:41", "TargetStart": "2023-06-27T00:00:00", "TargetFinish": "2023-06-28T00:00:00", "ActualStart": null, "ActualFinish": null, "ScheduledStart": null, "ScheduledFinish": null, "_links": [], "_embedded": null }, "Labours": [], "MeterReadingRequired": false, "LinkedWorkRequests": [ { "FriendlyID": "WR4579", "ID": "c42ea398-863b-e711-946d-06ed362954d7", "_links": [], "_embedded": null }, { "FriendlyID": "WR4899", "ID": "2a099af7-8f7c-4fdb-8558-11654f3e3eb4", "_links": [], "_embedded": null } ], "_links": [], "_embedded": null }